package com.xfd.learn.prop;


import com.xfd.learn.constant.LoggerConstant;
import com.xfd.learn.enums.LoggerLevel;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @since 2024-10-23
 * @author xfd
 */
@ConfigurationProperties(prefix = LoggerConstant.LOGGER_PROPERTIES_PREFIX)
public class LoggerProperties {

    /**
     * 是否开启日志增强starter
     */
    private Boolean enable = true;


    /**
     * 是否开启异常日志事件推送
     */
    private Boolean enableErrorLogEvent = false;


    /**
     * 日志级别配置，默认，BODY
     * @see LoggerLevel
     */
    private LoggerLevel level = LoggerLevel.BODY;



    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Boolean getEnableErrorLogEvent() {
        return enableErrorLogEvent;
    }

    public void setEnableErrorLogEvent(Boolean enableErrorLogEvent) {
        this.enableErrorLogEvent = enableErrorLogEvent;
    }

    public LoggerLevel getLevel() {
        return level;
    }

    public void setLevel(LoggerLevel level) {
        this.level = level;
    }
}
